<? echo $adminMenu->write(); ?>

<div id="preview" style="display: none;"></div>

<? echo $form -> create(); ?>
<fieldset><legend><? __('NEWS_NEW_TITLE'); ?></legend>
<ul>
	<li><? echo $form -> input('News.title',array('label'=>__('TITLE',true),'style' => 'width:95%','div'=>false)); ?>
	</li>

	<li><? echo $form -> label('News.text',__("TEXT",true).' '.$html -> link($html -> image("help.png",array("alt"=>__("TEXY_HELP",true))),"http://texy.info/cs/syntax-podrobne",array("target"=>"new","title"=>__("TEXY_HELP",true)),null,false)); ?>
	<? echo $form -> textarea('News.text',array('style'=>'width:95%; height:30%;', 'rows'=> 10, 'cols'=>50)); ?>
	</li>

	<li><a href="#"
		onclick="Effect.toggle('advanced_settings','appear'); return false;"><? __('ADVANCED_SETTINGS'); ?></a>

	<div id="advanced_settings" style="display: none;" class="input_line">
	<? echo $form -> input('News.user_id',array('label'=>__('AUTHOR',true),'div'=>false)); ?>
	</div>
	</li>
</ul>
</fieldset>
<div class="input_line">
<button
	onclick="new Ajax.Updater('preview', '<? echo $html -> url(array('controller'=>'news','action'=>'preview')); ?>',  {asynchronous:true, evalScripts:true, parameters:Form.serialize('NewsAddForm'),onLoading:function(request){Element.show('news_loading')} ,onComplete:function(request){Element.hide('news_loading');Element.show('preview')}}); return false;"><? __('NEWS_PREVIEW') ?></button>
	<? echo $form -> submit(__('NEWS_PUBLISH',true),array("div"=>false)); ?>
<span id="news_loading" style="display: none;"><? echo $html -> image("spinner.gif",array('alt'=>"Spinner"));?></span>
</div>
</form>
